Conversation
… checked out Phase 2 was fetching README, dependency manifest, and root listing via gh api even when the user was sitting inside the repo. Each /contents/ call base64-wraps its payload inside a JSON envelope — a 30 KB README costs ~40 KB of tokens vs. raw bytes from Read. Phase 0 Step 2 now exports $PROJECT_ROOT when the repo is available locally (inferred from cwd, or supplied as a local path). Phase 2 branches on that signal: local reads via Read/Glob when set, gh api /contents/... fallback when unset (GitHub URL / owner/name path). The single gh api repos/<owner>/<name> metadata call is retained for fields with no local analogue (description, topics, homepage, fork, parent, default_branch).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
project-onboardskill now reads README, dependency manifest, and root listing from the local filesystem when$PROJECT_ROOTis set, saving thousands of tokens per run on repos with sizable READMEs (avoids the base64+JSON envelope thatgh api /contents/...wraps around every payload).$PROJECT_ROOTis exported in Phase 0 Step 2 whenever the repo is available locally (cwd inference viagit rev-parse --show-toplevel, or explicit local-path invocation resolved viarealpath).<owner>/<name>from outside a checkout) is unchanged — it still usesgh api /contents/...for everything.gh api repos/<owner>/<name>metadata call is retained for GitHub-only fields (description, topics, homepage, fork, parent, default_branch).main.Test plan
bun test test/skills-conformance.test.tspasses (134/134)project-onboardfrom inside pbrain and confirm Phase 0 idempotency gate short-circuits (already onboarded)project-onboardin a fresh session from a not-yet-onboarded local repo; confirm README + manifest come fromRead, root listing fromGlob, and only onegh api repos/...call firesproject-onboard <owner>/<name>from a non-repo directory; confirm remote-only path still usesgh apifor all four fetches